<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head th:replace="studentUnion/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <title>文件管理</title>
    <link href="../../static/layui/css/layui.css" rel="stylesheet"/>
    <link rel="stylesheet" href="../../static/css/style.css"/>
    <script src="../../static/layui/layui.js" type="text/javascript"></script>
</head>
<body>
<div style="padding: 10px">
    <div class="layui-upload" >
        <div class="layui-btn-group">
            <button type="button" class="layui-btn layui-btn-normal" id="file">选择多文件</button>
            <button type="button" class="layui-btn" id="fileListAction">开始上传</button>
        </div>
        <div class="layui-btn-group" >
            <form class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-input-inline" style="width: 350px;">
                        <input type="radio" name="visible" value="1" title="主席" checked shiro:hasAnyRoles="admin">
                        <input type="radio" name="visible" value="2" title="副主席" shiro:hasAnyRoles="admin,chairman">
                        <input type="radio" name="visible" value="3" title="部长"  shiro:hasAnyRoles="chairman,vice-chairman">
                        <input type="radio" name="visible" value="-1" title="所有" shiro:hasAnyRoles="admin">

                        <input type="radio" name="visible" value="4" title="部门" shiro:hasAnyRoles="minister">
                    </div>
                </div>
            </form>
        </div>
        <div class="layui-upload-list" >
            <table class="layui-table">
                <thead>
                <tr>
                    <th>文件名</th>
                    <th>大小</th>
                    <th>上传进度</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="fileList"></tbody>
            </table>
        </div>
    </div>
</div>

<table class="layui-hide" id="fileTable" lay-skin="line" lay-even lay-filter="fileTable"></table>

<script type="text/html" id="toolFile">
    <form class="layui-form" lay-filter="fileForm" id="fileForm">
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="text" name="fileName"
                       placeholder="文件名称" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" name="meName"
                       placeholder="所属人" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <div class="layui-btn-group">
                    <span class="layui-btn  clean" onclick="$('#fileForm')[0].reset()">
                            <i class="layui-icon layui-icon-refresh-3"></i> 重置
                        </span>
                    <span class="layui-btn  layui-bg-blue change" data-type="file" onclick="ConditionsQuery(this)">
                            <i class="layui-icon layui-icon-search"></i> 查询
                        </span>
                </div>
            </div>
        </div>
    </form>
</script>
<script type="text/html" id="barFile">
    <button class="layui-btn layui-bg-blue layui-btn-sm" lay-event="preview" shiro:hasPermission="transaction:file:preview">预览</button>

    <button class="layui-btn layui-btn-sm" lay-event="download" shiro:hasPermission="transaction:file:download">下载</button>
    {{# var id = meId;}}
    {{#  if(d.meId == id ){ }}
    <button class="layui-btn layui-btn-danger layui-btn-sm"  lay-event="del" shiro:hasPermission="transaction:file:del">
        <i class="layui-icon layui-icon-delete"></i>删除</button>
    {{# } }}
</script>
<script th:inline="javascript">
    var meId = /*[[${meId}]]*/ 'Sebastian';
</script>
</body>
</html>
